// Copyright (C) 1953-2022 NUDT
// Verilog module name - endD_traffic_statistical 
// Version: V4.3.0.20230902
// Created:
//         by - fenglin 
////////////////////////////////////////////////////////////////////////////
// Description:
///////////////////////////////////////////////////////////////////////////
`timescale 1ns/1ps
module endD_traffic_statistical(
input                 i_clk_125m,
input                 i_rst_n,
input      [79:0]     iv_localclk,
input      [8:0]      iv_data,
input                 i_data_wr, 
input                 i_teststart_en,

output     [31:0]     ov_flowA_discard_counter,  
output     [31:0]     ov_flowB_discard_counter,  
output     [31:0]     ov_flowC_discard_counter, 
output     [2:0]      ov_pktin_pulse,  
output     [63:0]     ov_flowA_delay_jitter,
output     [63:0]     ov_flowA_maxdelay,  
output     [63:0]     ov_flowA_mindelay,
output     [63:0]     ov_flowB_delay_jitter,
output     [63:0]     ov_flowB_maxdelay,  
output     [63:0]     ov_flowB_mindelay,
output     [63:0]     ov_flowC_delay_jitter,
output     [63:0]     ov_flowC_maxdelay,  
output     [63:0]     ov_flowC_mindelay
);         

wire       [63:0]     wv_flowA_delay  ;
wire       [63:0]     wv_flowB_delay  ;
wire       [63:0]     wv_flowC_delay  ;
wire                  w_flowA_delay_wr;
wire                  w_flowB_delay_wr;
wire                  w_flowC_delay_wr;

delay_process delay_process_instA(
.i_clk          (i_clk_125m    ),                 
.i_rst_n        (i_rst_n       ),            
                                          
.i_teststart_en (i_teststart_en    ),                 
.iv_delaydata   (wv_flowA_delay     ),                 
.i_delaydata_wr (w_flowA_delay_wr   ),
.ov_delay_jitter(ov_flowA_delay_jitter   ),                 
.ov_max_delay   (ov_flowA_maxdelay  ),
.ov_min_delay   (ov_flowA_mindelay  )
);
delay_process delay_process_instB(
.i_clk          (i_clk_125m    ),               
.i_rst_n        (i_rst_n       ),    
   
.i_teststart_en (i_teststart_en    ),
.iv_delaydata   (wv_flowB_delay     ),
.i_delaydata_wr (w_flowB_delay_wr   ),
.ov_delay_jitter(ov_flowB_delay_jitter   ),  
.ov_max_delay   (ov_flowB_maxdelay  ),
.ov_min_delay   (ov_flowB_mindelay  )
);
delay_process delay_process_instC(
.i_clk          (i_clk_125m    ),               
.i_rst_n        (i_rst_n       ),    
   
.i_teststart_en (i_teststart_en   ),
.iv_delaydata   (wv_flowC_delay    ),
.i_delaydata_wr (w_flowC_delay_wr  ),
.ov_delay_jitter(ov_flowC_delay_jitter   ), 
.ov_max_delay   (ov_flowC_maxdelay ),
.ov_min_delay   (ov_flowC_mindelay )
);

traffic_receive_and_recognition traffic_receive_and_recognition_inst(
.i_clk           (i_clk_125m     ),  
.i_rst_n         (i_rst_n        ),  
.iv_localclk     (iv_localclk    ),  
.iv_data         (iv_data        ),  
.i_data_wr       (i_data_wr      ), 
.i_teststart_en  (i_teststart_en    ), 
.ov_flowA_discard_counter   (ov_flowA_discard_counter    ),  
.ov_flowB_discard_counter   (ov_flowB_discard_counter    ),  
.ov_flowC_discard_counter   (ov_flowC_discard_counter    ),  
.ov_pktin_pulse  (ov_pktin_pulse ),  
.ov_flowA_transdelay   (wv_flowA_delay  ),  
.ov_flowB_transdelay   (wv_flowB_delay  ),  
.ov_flowC_transdelay   (wv_flowC_delay  ),
.o_flowA_delay_wr (w_flowA_delay_wr), 
.o_flowB_delay_wr (w_flowB_delay_wr),  
.o_flowC_delay_wr (w_flowC_delay_wr)  
); 
endmodule
/*
endD_traffic_statistical endD_traffic_statistical_inst(
.i_clk_125m	     (),
.i_rst_n	     (),
.iv_localclk     (),
.iv_data	     (),
.i_data_wr	     (), 
.i_teststart_en	 (),
.ov_flowA_discard_counter     (),  
.ov_flowB_discard_counter     (),  
.ov_flowC_discard_counter     (), 
.ov_pktin_pulse  (),  
.ov_flowA_delay_jitter(),
.ov_flowA_maxdelay(),  
.ov_flowA_mindelay(),
.ov_flowB_delay_jitter(),
.ov_flowB_maxdelay(),  
.ov_flowB_mindelay(),
.ov_flowC_delay_jitter(),
.ov_flowC_maxdelay(),  
.ov_flowC_mindelay()
);
*/